import {mapMutations} from "vuex"
export default{
  data(){
    return{
      user:{
        username:"11",
        password:"111"
      },
      switchVal: false
    }
  },
  methods:{
    ...mapMutations("login",["GET_USER","SET_TOEKN"]),
    login(){
      this.GET_USER();
    },
    switchChange(){
      this.switchVal=!this.switchVal;
      this.SwitchThemes(this.switchVal);
    },
    SwitchThemes(val){
     
      if(val){
        window.document.documentElement.setAttribute('data-theme', "dark");
      }else{
        window.document.documentElement.setAttribute('data-theme', "light");
      }
    },
  },
  mounted() {
    console.log(process.env.VUE_APP_BASE_URL);
    this.SwitchThemes(this.switchVal);
    // this.SET_TOEKN();
  },
}
